package com.huangmb.anymark.app.model;

import android.os.Parcel;
import android.os.Parcelable;

/**
 * @author hmb
 * @version 1.0
 * @since 2016/5/7 12:42
 */
public class Category implements Parcelable{
    private int id;
    private String mName;
    private String mDescription;

    public Category() {

    }
    public Category(int id){
        this.id = id;
    }

    protected Category(Parcel in) {
        id = in.readInt();
        mName = in.readString();
        mDescription = in.readString();
    }

    public static final Creator<Category> CREATOR = new Creator<Category>() {
        @Override
        public Category createFromParcel(Parcel in) {
            return new Category(in);
        }

        @Override
        public Category[] newArray(int size) {
            return new Category[size];
        }
    };

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getName() {
        return mName;
    }

    public void setName(String name) {
        mName = name;
    }

    public String getDescription() {
        return mDescription;
    }

    public void setDescription(String description) {
        mDescription = description;
    }

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeInt(id);
        dest.writeString(mName);
        dest.writeString(mDescription);
    }

}
